package org.dromara.pc.aspect;

import lombok.RequiredArgsConstructor;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
import org.dromara.pc.config.FreemarkerConfig;

@Aspect
@Component
@RequiredArgsConstructor
public class ConfigRefreshAspect {

    private final FreemarkerConfig freemarkerConfig;

    @Before("execution(* org.dromara.pc.controller.*Controller.*(..))")
    public void refreshConfig() {
        freemarkerConfig.refreshConfig();
    }
} 